Method and apparatus for controlling heater of a gas sensor

ABSTRACT

Energization of a heater built in a gas sensor, such as an oxygen sensor, used in an air/fuel ratio control system of an internal combustion engine, is controlled to maintain the temperature of the same within a desired range. The temperature of the heater is calculated using a measured resistance value of the heater, and engine parameters used for estimating a specific engine operating condition. To this end operating state of the engine is first detected to determine whether it is possible to estimate the actual temperature of the heater, and when possible, a reference resistance value of the heater at a reference temperature such as 0° K. or 0° C. is caluclated using estimated heater temperature and a measured resistance value. Once the initial resistance value is obtained, this is used to calculate actual heater temperature using measured resistance value and a predetermined temperature coefficient.

BACKGROUND OF THE INVENTION

This application pertains to the same general subject matter asco-pending applications, Ser. No. 585,861 filed Mar. 2, 1984 now U.S.Pat. No. 4,543,176, by Hara et al, and Ser. No. 623,219 filed June 21,1984 now U.S. Pat. No. 4,548,179 by Ninomiya et al but the specificsubject matter taught and and claimed is different therefrom.

This invention relates generally to an air/fuel ratio contol system foran internal combustion engine used for motor vehicles or the like, andparticularyly, to apparatus for heating an oxygen sensor used fordetecting the concentration of oxygen in exhaust gases.

In a typical air/fuel ratio control system used for internal combustionengines of motor vehicles of the type using a three-way catalyticconverter, an oxygen sensor is used to detect the concentration ofresidual oxygen included in exhausted gases from the engine so as tocontrol the air/fuel ratio to be close to a stoichiometric value. Suchoxygen sensors have a given operating temperature range in which adetection current corresponding to the concentration of oxygen can beobtained, and in order to keep the temperature of such a sensor at ahigh value, such as above 500° C., a plutinum heater is built therein tocontinuously heat the body of the sensor during operation.

However, since the heater is continuously energized to heat the sensor,in the case that the sensor and the heater buit therein are overheatedto a temperture such as above 1,400° C. due to abnormal overheating ofthe exhaust gases, breaking of the heater wire is apt to occur to stopnormal detecting operation. Abnormal state of the oxygen sensor maycause the air/fuel ratio control system to supply the engine with anexcessively lean mixture. To prevent such undesirable phenemenontherefore, feedback control using the oxygen sensor output is terminatedon such abnormal condition and the air/fuel ratio is controlled to asetting value by way of an open loop control as described in JapanesePatent Provisional Publication No. 57-140539. Although this technique ofswitching from feedback control to open loop control avoids extremelyundesired control of an air/fuel mixture, it does not provide a basicsolution since the feedback control cannot be recovered unless thebroken sensor is replaced with a normal one or repaired.

SUMMARY OF THE INVENTION

The present invention has been developed in order to remove theabove-described drawbacks inherent to the conventional air/fuel ratiocontrol system using an oxygen sensor.

It is, therefore, an object of the present invention to provide a newand useful apparatus for controlling heater of an oxygen sensor used insuch an air/fuel ratio control system of an internal combustion engine.

According to a feature of the present invention heater energization iscontrolled by detecting the temperature of the heater of the oxygensensor provided within an exhaust pipe to prevent overheating, while theheater temperature is calculated using a measured resistance value ofthe heater, and engine parameters used for estimating a specific engineoperating condition. More particulary, operating state of the engine isfirst detected to determine whether it is possible to estimate theactual temperature of the heater, and when possible, a referenceresistance, such as an initial resistance value of the heater atabsolute zeropint is calculated using estimated heater temperature, aknown temperature coefficient, and a measured resistance value. Once theinitial resistance value is obtained, this is used to calculate actualheater temperature using measured resitance value and the predeterminedtemperature coefficient.

In accordance with the present invention there is provided apparatus forcontrolling a heater of a gas sensor used for detecting theconcentration of a gas component of exhaust gases from an internalcombustion engine, comprising: a temperature sensor for detecting atemperature relating to said engine; first means for detecting aparticular engine operating condition from which it is possible toestimate the temperature of said heater using said temperature relatingto said engine; second means for measuring an actual resistance value ofsaid heater; third means for calculating a reference resistance value ofsaid heater at a predetermined reference temperature; for calculatingthe temperature of said heater using said meaured resistance value, saidreference resistance value, and a predetermined temperature coefficient;and for producing a control signal using the calculated heatertemperature; and fourth means for controlling the energization of saidheater in accordance with said control signal.

In accordance with the present invention there is also provided a methodof controlling a heater of a gas sensor used for detecting theconcentration of a gas component of exhaust gases from an internalcombustion engine, comprising the steps of: detecting a temperaturerelating to said engine; detecting a particular engine operatingcondition from which it is possible to estimate the temperature of saidheater using said temperature relating to said engine; measuring anactual resistance value of said heater; calculating a referenceresistance value of said heater at a predetermined referencetemperature; calculating the temperature of said heater using saidmeaured resistance value, said reference resistance value, and apredetermined temperature coefficient; producing a control signal usingthe calculated heater temperature; and controlling the energization ofsaid heater in accordance with said control signal.

BRIEF DESCRIPTION OF THE DRAWINGS

The object and features of the present invention will become morereadily apparent from the following detailed description of thepreferred embodiments taken in conjunction with the accompanyingdrawings in which:

FIG. 1 is a schematic view of the apparatus acccording to the presentinvention for controlling a heater of an oxygen sensor used in anair/fuel ratio control system;

FIG. 2 is a graph showing the relationship between the temperature andresitance value of two like oxygen sensor heaters;

FIG. 3 is a schematic block diagram of the appratus according to thepresent invention;

FIGS. 4 and 5 are flowcharts showing the operation of an embodiment ofthe apparatus;

FIG. 6 is a graph useful for understanding the processing shown in aroutine of FIG. 5; and

FIG. 7 is a flowchart showing the operation of another embodiment.

The same or corresponding elements and parts are designated at likereference numerals throughout the drawings.

DETAILED DESCRIPTION OF THE INVENTION

Referring to FIG. 1, a schematic illustration of an air/fuel ratiocontrol system for an internal combustion engine is shown. The reference1 indicates a well-known six-cylinder spark ignition internal combustionengine arranged to suck intake air via an air cleaner 2, an intake pipe3, a throttle valve 4 and an intake manifold into its cylinders. Thereference 6 is an exhaust manifold for leading exhaust gases via anexhaust pipe 7 to a catalytic converter 8 and exhausting the same toatomosphere. An airflow meter or sensor 11 of potentiometer typearranged to output an analog voltage indicative of the quantity ofintake air is installed in the intake pipe 3. In addition, an intake airtemperature sensor 12 of thermister type for detecting the temperatureTa of the intake air and for producing an analog voltage indicative ofthe temperature of the intake air is also installed in the intake pipe3. A coolant sensor 13 of thermister type for detecting the temperatureTc of the engine coolant and for producing an analog voltage indicativeof the same is installed in the engine body 1. An oxygen sensor 14 fordetecting the concentration of residutal oxygen in the exhaust gases andproducing an analog voltage porportional to the concentration thereof isprovided within the exhaust manifold 6. The oxygen sensor 14 is of solidelectrolyte type using principle of concentration cell to detect theconcentration of oxygen. More particularly, a platinum heater 14a isbuilt in the oxygen sensor 14 to activate the sensor 14 with a solidelectrolyte using zirconium being heated to be over approximately 500°C. irrespective of the operating condition of the engine 1. The platinumheater 14a has a substantially constant positive temperature coefficienta with respect to its temperature, and its resistatance value RH isgiven by:

    RH=RHo+αTH

wherein

RHo is a resistance value at absolute zeropoint (0° K.), which will bereferred to as an initial resistance value hereinater; and

TH is a present temperature (° K) of the heater 14a.

As RHo may be used a resistance value at 0° C., and in such a case, thetemperature TH is given as having unit of ° C. In this way RHo may be areference resistance value at any reference temperature, and TH may bethe temperature difference between actual temperature of the heater 14and the reference temperature.

FIG. 2 is a graph showing the relationsip between the temperature of theheater 14a and the resistance value RH. As will be understood fromtypical two curves in FIG. 2, the initial resistance value RHo variesthroughout products due to monuniformity in manufacturing process or thelike. For instance, in the case of a heater indicated by a curve A, theresistance RH is 5 ohms at 500° C., whereas the temperature, at whichthe resistance RH of another heater indicated by a curve B assumes 5ohms, is 1,000° C. Such variation or scattering throughout products maycause inaccurate measurement of the resistance value of the heater 14awhich may lead to inaccurate measurement of the temperature of theheater 14a. In order to avoid such inaccuracy, therefore, thetemperature of the heater 14a is first estimated using engine operatingcondition as will be described hereinlater, and then a resistance valueRH of the heater 14a at a reference temperature, such as absolutezeropoint (0° K.)or 0° C., is calculated. Once such a referenceresistance value, which may be the above-mentioned initial resistancevalue RHo at absolute zeropoint, is obtained, then present temperatureTH of the heater 14a can be calculated using measured resistance valueRH and the predetermined temperature coefficient α.

Turning back to FIG. 1, the reference 10 is a thermister type exhaustgas temperature sensor installed within the exhaust pipe 7, and thereference 16 is a throttle opening degree sensor for detecting theopening degree of the throttle valve 4. The reference 15 is an enginerotational speed sensor of pickup coil type for detecting the rotationalspeed (rpm) of the crankshaft of the engine 1. This rotational speedsensor 15 is installed within a distributor 22 to face a rotor (notshown) thereof so as to produce a pulse train signal corresponding toengine rpm.

A control unit 20, which may be actualized by a microcomputer andperipheral circuits, is provided to receive detection signals from theabove-mentioned various sensors 10 to 16, and to control the amount offuel supplied to the engine 1. In this embodiment, electromagnetic fuelinjection valves 5 are controlled such that their opening durationcorresponds to a desired amount of fuel to be injected into respectivecylinders. In addition to the air/fuel ratio control, the energizationof the heater 14a of the oxygen sensor 14 is also controlled by thecontrol unit 20. This control unit 20 will be further described indetail with reference to FIG. 3.

Referring now to FIG. 3, the control unit 20 comprises a centralprocessing unit (CPU) 100, several memories and various peripheral orauxialiary circuits so that fuel injection amount and energizingduration of the heater 14a are computed in accordance with apredetermined program. The CPU 100 per se is well known, and one of 8,12 or 16 bit type may be used.

A revolution number counter 101 is provided for counting the number ofpulses from the electromagnetic pickup 37 so that data Ne indicative ofengine speed is fed to the CPU 100. The revolution number counter 101also has a function of generating an interrupt command signal insynchronism with the engine rotation. The interrupt command signal isfed to an interrupt control circuit 102 which sends an interrupt requestvia a bus 150 to the CPU 100.

A digital input port 103 is provided to receive signals from anairconditioner switch and a starter switch and to send them to the CPU100.

An analog input port 104 comprises an A/D converter, a multplexer or thelike for receiving signals from various sensors and transmitting thesame via the bus 150 to the CPU 100. In detail, various detectionsignals from the intake airflow sensor 1, the intake air temperaturesensor 12, the coolant temperature sensor 13, the exhaust gastemperature sensor 10, the oxygen sensor 14, the throttle valve openingdegree sensor 16 are all A/D converted to be transmitted in sequence tothe CPU 100.

Power supply circuits 105 and 106 are provided for regulating an outputvoltage from a vehicle-mounted battery 19. The first power supplycircuit 106 is connected via a key switch 18 to the battery 19, whilethe second power supply circuit 105 is directely connected to thebattery 19. The second power supply circuit 105 is arranged to supply arandom-access-memory (RAM) 107 with power all the time, and the firstpower supply circuit 106 is arranged to supply remaining circuits withpower when the key switch 18 is in on stae.

The RAM 107 is used to temporarily store various data so that the CPU100 executes programs as will be described later. Since the RAM 107always receives power irrespective of the state of the key switch 18,the contents stored therein are prevented from being erased. In otherwords, the RAM 107 functions as a nonvolatile memory of power backuptype.

A read-only-memory (ROM) 108 is provided to store various programs aswell as constants necessary for calculations, and is arranged such thatthe contents thereof are read out via the bus 150 by the CPU 100.

A timer 111 is provided to measure lapse of time by counting the numberof clock pulses. Thus, the timer 111 supplies the CPU 100 with clockpulses, and also produces an interrupt command signal at a predeterminedinterval, which is fed to the interrupt control circuit 102.

An output circuit 109 is provided to respectively output drive signalsto the fuel injection valves 5. The output circuit 109 comprises alatch, down counter, power transistor so that it produces an outputactuating or driving signal in accordance with the results ofcalculations executed by the CPU 100. The output circuit 109 produces,as the drive signal, a pulse train signal, having a pulse widthindicative of fuel injection amount in accordance with fuel amount dataobtained by the CPU 100.

A heater control circtui 110 is provided to control the energization ofthe heater 14a of the oxygen sensor 14 in accordance with the results ofcalculations executed by the CPU 100. More specifically, the heater 14ais turned on or off in accordance with instructions from the CPU 100. Aheater resistance detecting circuit 17 is provided to detect theresistance value RH of the heater 14a and this resistance value RH isinputted to the analog input port 104 to be transmitted to the CPU 100.To detect the resistance value RH, for instance, a predetermined voltageis applied to the heater 14a to detect a current flowing therethrough.

Now the operation of the control unit 20, especially the CPU 100thereof, will be described with reference to flowcharts of FIGS. 4 and5. FIG. 4 illustrates a routine stored in the ROM 108. The control unit20 is arranged to operate the processing shown in the routine of FIG. 4and also another proecessing for determining the amount of fuel fed intothe cylinders of the engine 1 via the injection valves 5. In FIG. 4, theoperational flow of the control unit 20 enters into a step 210 when thekey switch 18 is turned on. As soon as the routine is started,initialization is performed to prepare for the following operations withvarious registers being reset. In addition, the contents of the RAM 107are checked and necessary resetting is peformed. After this, variousengine parameters and other data are read in. In detail, cooltanttemperature Tc from the coolant temperature sensor 13, intake airtemperature Ta from the intake air temperature sensor 12 and theresistance value RH from the heater resistor detector 17 are all takenvia the analog input port 104 into the CPU 100 to store the same intothe RAM 107 in a step 210. In a following step 220, it is checkedwhether the detected coolant temperature Tc equals the detected intakeair temperature Ta. If Tc equals Ta, it is regarded that the engine 1 isin completely cooled down state, i.e. engine starting state under acondition in which the heater 14a is in thermally equilibrium with thecoolant. In other words, since the fact that the coolant temperature Tcequals the intake air temperature Ta indicates that the engine 1 has notbeen operated for a long period of time such as several hours, and thenthe temperature TH of the heater 14a can be regarded to be equal to thecoolant or intake air temperature Tc or Ta. In a subsequent step 230,the initial resistance value RHo is calculated using the coolant orintake air temperature Tc or Ta as the temerature TH of the heater 14aand also the temperature coefficient α, which is prestored in the ROM108, in accordance with the following equation:

    RHo=RH-αTH

As described hereinabove, although the initial resistance value RHo atthe absolute zero point is obatained in this embodiment, a resistancevalue at any other reference value, such as 0° C. may be used in placeof such initial resistance value at 0°K. After the initial resistancevalue RHo is obtained in the step 230, then it is checked whether theobtained RHo is within a given range to determine whether RHo is normalor not. For instance, since an average initial resistance value RHo fora number of oxygen sensors is 0.16 ohm, it is checked whether RHo iswithin a range from 0.14 to 0.18 ohm. In the case of using 0° C. as thereference temperature, it is checked whether the RHo is within a rangefrom 0.9 to 1.1 ohm. As the above-mentioned temperature coefficient αmay be used 3.1×10⁻³ ohm/° C. When the initial resistance value RHo isdetected to be normal in the step 240, the normal initial reistancevalue RHo is then stored in the RAM 107 in a following step 250.

In this way, in the embodiment shown in FIG. 4, the initial resistancevalue RHo of the heater 14a at the time of engine start is calculated tobe stored in the RAM 107. Then an interrupt service routine shown inFIG. 5 is executed when an interrupt request occurs. In detail,interrupt request may be produced as a timer interruption from the timer111 or an engine revolution number interruption from the revolutionnumber counter 101.

In the interrupt service routine of FIG. 5, the resistance RH of theheater 14a detected by the heater resistance detector 17 is taken intothe CPU 100 in a step 300, and then in a following step 310 thetemperature TH of the heater 14a is calculated using the followingequation:

    TH=(RH-RHo)/α

As the temperature coefficient α, the above mentioned one prestored inthe ROM 108 is used while the above-described initial resistance valueRHo obtained and stored in the RAM 107 in the routine of FIG. 4 is usedas RHo. In a following step 320, the exhaust gas temperature Tx detectedby the exhaust gas temperature sensor 10 is taken into the CPU 100. Inthe case such exhaust gas temperature sensor 10 is not used, the exhaustgas temperature can be estimated from a data map stored in the ROM 108using engine rpm and fuel injection amount obtained through anotherprocessing routine. Then in a step 330, a target heater temperaturerange is obtained by calculating an upper limit THmax and an lower limitTHmin using the exhaust gas temperature data Tx. This is performed usinga given formula or data map. The way of determining the target heatertemperature range will be described with reference to FIG. 6. The oxygensensor 14 has its optimal operating temperature range, such as from 650°C. to 750° C., where this temperature is around electrodes of the sensor14. Since the heater 14a built in the sensor 14 is spaced apart from theinner electrode, which is closer to the heater 14a than the outerelectrode, by a given distance, the temperature TH of the heater 14ashould be higher than a desired temperature of the sensor 14. On theother hand, since the exhaust gas temperature sensor 10 is remote fromthe oxygen sensor 14, the exhaust gas temperature Tx meaured thereby islower than the temperature of the sensor 14. The above relationship isshown as temperature gradient in FIG. 6. Using the temperature gradientof FIG. 6, once the exhaust gas temperature Tx is obtained, the upperlimit THmax and the lower limit THmin of the target temperature rangeare readily obtained. These upper limit THmax and lower limit THmin arestored in the RAM 107.

Using the upper limit THmax and the temperature TH caclulated in thestep 310, it is checked whether TH is higher than the upper limit THmax.If the determination in the step 340 is YES, the heater 14a is turnedoff in a step 360 to lower the temperature thereof. On the other hand,when the determination in the step 340 is NO, another step 350 isexecuted to see if TH is lower than the lower limit THmin. If thedetermination in the step 350 is YES, the heater 14a is turned on in astep 370 to raise the temperature thereof. On the other hand, when thedetermination in the step 350 is NO, the interrupt service routine isterminated. Similarly, after the execution of the step 360 or 370, theinterrupt service routine is terminated. Turning on or off of the heater14a is performed by sending an instruction signal from the CPU 100 tothe heater control circuit 110 used to energize and deenergize theheater 14 in accordance with the instruction signal.

Since the interrupt service routine of FIG. 5 is repeatedly executed ata given interval or at a period corresponding to a given number ofengine revolutions, the energization of the heater 14a of the oxygensensor 14 is controlled such that the temperature TH of the heater 14ais always in the target temperature range which varies in accordancewith the exhaust gas temperature Tx. In this way power supply to theheater 14a is controlled such that the temperature of the oxygen sensor14 is optimal for activating the same. As a result, activation of theoxygen sensor 14 is possible irrespective of the the engine operatingcondition.

In the above-described embodiment, it is regarded that the temperatureTH of the heater 14a equals either the temperature Tc or Ta of thecoolant or the intake air as described with the routine of FIG. 4.However, this estimation can be used only when the engine 1 is startedafter a relatively long time stopping. In the case that the engine isoperated for a while so that the temepature TH of the heater 14 is closeto the temperature Tx of the exhaust gases, another way of estimation ofthe temperature TH of the heater 14a may be used.

Hence, reference is made to FIG. 7 showing a flowchart of a routine fora second embodiment. This routine may be used in place of the routine ofFIG. 4. In the routine of FIG. 7, initialization is performed in thesame manner as in the first embodiment as described with reference toFIG. 4. Then in a first step 400, various data is taken into the CPU 100and then stored in the RAM 7. The various data includes engine speed Nefrom the revolution number counter 101, exhaust gas temperature Tx fromthe exhaust gas temperature sensor 10 in addition to the resistancevalue RH of the heater 14a. Then in a following step 410, the resistancevalue RH and the engine speed Ne are used to detect their variation ΔRHand ΔNe within a given period of time. To this end the resistance valueTH and the engine speed Ne are both measured at least twice respectivelyin the step 400. In a following step 420, it is checked whether ΔRH issmaller than a predetermined value J or not and whether ΔNe is smallerthan a predetemined value K or not. When these two determinations areresulted in YES, it is regarded that the heater 14a exists in thermalequilibrium with the exhaust gases because the temperature of theexhaust gases is constant and the variation in the heater resistance RHis small when the engine 1 is in steady state. Then a step 430 isexecuted to calculate the initial resistance value RHo using thefollowing equation:

    RHo=RH-αTH

In the above, since actual temperature of the heater 14a is unknown, theexhaust gas temperature Tx or a value close thereto is regarded as thetemperature TH of the heater 14a. More specifically, the exhaust gastemperature Tx may be multiplied by a predetermined factor such as valuebetween 1.0 and 1.2.

If the value of ΔRH is larger than the predetermined value therefor, orthe value of ΔNe is larger than the predetermined value therefor, thensteps 430 to 450 are skipped so that the initial resistance value RHo isnot calculated. After the execution of the step 430, steps 440 and 450which are substantially the same as the steps 240 and 250 of FIG. 4 areexecuted. Once the value of initial resistance RHo is determined, thenon-off control of the heater 14a is performed via the interrupt serviceroutine of FIG. 5 in the same manner as in the first embodiment.

Although the variation in the engine speed Ne is checked in the secondembodiment to determine if the engine is in steady state, the variationof the exhaust gas temperature Tx may be checked in place of the enginespeed Ne. Therefore, when the exhaust gas temperature Tx is used inplace of engine speed Ne, it can be regarded that the heater 14a existsin thermal equilibrium with exhaust gases when the variation of theexhaust gas temperature as well as the variation of the heaterresistance RH is small.

From the foregoing, it will be understood that the temerature of theheater of a gas sensor, such as an oxygen sensor, is readily estimatedfirst when the engine is in a particular operating condition, such as astarting state after a relatively long time nonuse or a steady state,and then a resistance value of the heater at a reference temperaturesuch as 0° K. or 0° C. is calculated used the estimated temperature andmeasured resistance. Once such a reference resistance is obtained, thenthe temperature of the heater can be readily calculated using a measuredresistance value and the known temperature coefficient. In this way, thetemperature of the heater is accurately detected so that accurate on-offcontrol in the energization of the heater is possible to keep the sensorin a suitable operating temperature range.

The above-described embodiments are just examples of the presentinvention, and therefore, it will be apparent for those skilled in theart that many modifications and variations may be made without departingfrom the scope of the present invention.

What is claimed is:
 1. Apparatus for controlling a heater of a gassensor used for detecting the concentration of a gas component ofexhaust gases from an internal combustion engine, comprising:(a) atemperature sensor for detecting a temperature relating to said engine;(b) first means for detecting a particular engine operating condition ofthermal equilibrium from which it is possible to estimate thetemperature of said heater using said detected temperature relating tosaid engine; (c) second means for measuring an actual resistance valueof said heater; (d) third means responsive to said temperature sensorand first and second means for calculating a reference resistance valueof said heater at a predetermined reference temperature using saiddetected temperature relating to said engine and said resistance of saidheater at the time said first means detects said particular engineoperating condition; (e) fourth means responsive to said second andthird means for calculating the temperature of said heater using saidmeasured heater resistance value, said reference resistance valueobtained by said third means, and a predetermined temperaturecoefficient and for producing a control signal using the calculatedheater temperature so that said calculated heater temperature equals adesired temperature; and (f) fifth means for controlling theenergization of said heater in accordance with said control signal. 2.Apparatus as claimed in claim 1, wherein said temperature sensor is anengine coolant temperature sensor, and said first means comprises anintake air temperature sensor and means responsive to an output signalfrom said engine coolant temperature sensor and an output signal fromsaid intake air temperature sensor for determining whether said coolanttemperature is equal to said intake air temperature.
 3. Apparatus asclaimed in claim 1, wherein said temperature sensor is an intake airtemperature sensor, and said first means comprises an engine coolanttemperature sensor and means responsive to an output signal from saidengine coolant temperature sensor and an output signal from said intakeair temperature sensor for determining whether said coolant temperatureis equal to said intake air temperature.
 4. Apparatus as claimed inclaim 1, wherein said temperature sensor is an exhaust gas temperaturesensor, and said first means comprises means responsive to said secondmeans for determining whether the variation of said actual resistance issmaller than a predetermined value or not, and means for determiningwhether the variation of the speed of said engine is smaller than apredetermined value or not, said fourth means having means fordetermining said desired temperature in accordance with an exhaust gastemperature detected by said exhaust gas temperature sensor so as toproduce said control signal with which said calculated heatertemperature equals said desired temperature.
 5. Apparatus as claimed inclaim 1, wherein said temperature sensor is an exhaust gas temperaturesensor, and said first means comprises means responsive to said secondmeans for determining whether the variation of said actual resistance issmaller than a predetermined value or not, and means for determiningwhether the variation of said exhaust gas temperature sensor is smallerthan a predetermined value or not.
 6. Apparatus as claimed in claim 1,wherein said predetermined reference temperature is 0° K.
 7. Apparatusas claimed in claim 1, wherein said predetermined reference temperatureis 0° C.
 8. Apparatus as claimed in claim 1, further comprising anexhaust gas temperature sensor for detecting the temperature of theexhaust gases from said engine, and wherein said fourth means isarranged to obtain a desired temperature range, including said desiredtemperature, for said heater using said exhaust gas temperature and adesired temperature range for said gas sensor, and to produce saidcontrol signal by detecting whether said temperature of said heaterobtained using said measured heater resistance is within the desiredtemperature range for said heater.
 9. A method of controlling a heaterof a gas sensor used for detecting the concentration of a gas componentof exhaust gases from an internal combustion engine, comprising thesteps of:(a) detecting a temperature relating to said engine; (b)detecting a particular engine operating condition of thermal equilibriumfrom which it is possible to estimate the temperature of said heaterusing said detected temperature relating to said engine; (c) measuringan actual resistance value of said heater; (d) calculating a referenceresistance value of said heater at a predetermined reference temperatureusing said temperature relating to said engine and said actualresistance of said heater at the time said particular engine operatingcondition is detected; (e) calculating the temperature of said heaterusing said measured heater resistance value, said reference resistancevalue, and a predetermined temperature coefficient; (f) producing acontrol signal using the calculated heater temperature so that saidcalculated heater temperature equals a desired temperature; and (g)controlling the energization of said heater in accordance with saidcontrol signal.
 10. A method as claimed in claim 9, wherein saidtemperature relating to said engine is the engine coolant temperature,and said particular engine operating condition is detected when saidcoolant temperature is equal to intake air temperature of said engine.11. A method as claimed in claim 9, wherein said temperature relating tosaid engine is engine intake air temperature, and said particular engineoperating condition is detected when said intake air temperature isequal to coolant temperature of said engine.
 12. A method as claimed inclaim 9, wherein said temperature relating to said engine is engineexhaust gas temperature, and said particular engine operating conditionis detected when the variation of said actual resistance is smaller thana predetermined value, and when the variation of engine speed is smallerthan a predetermined value.
 13. A method as claimed in claim 9, whereinsaid temperature relating to said engine is engine exhaust gastemperature, and said particular engine operating condition is detectedwhen the variation of said actual resistance is smaller than apredetermined value, and when the variation of said exhaust gastemperature is smaller than a predetermined value.
 14. A method asclaimed in claim 9, further comprising the steps of:(a) detecting thetemperature of the exhaust gases from said engine; and (b) obtaining adesired temperature range, including said desired temperature, for saidheater using said exhaust gas temperature so that said control signal isproduced by detecting whether said temperature of said heater obtainedby said heater resistance value is within the desired temperature rangefor said heater.